/*
Copyright 2007 Raymond Giorgi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 */

package edu.pitt.CS2510.Grids;

/**
 * @author Alichino
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class GridPiece {

	private int units;
	private boolean used;
	private int team;
	private int x, y;
	public static int Enemy = 0;
	public static int Friend = 1;

	public GridPiece(int x, int y){
		this.x = x;
		this.y = y;
		used = false;
	}
	public GridPiece(){

	}

	public void clear(){
		units = 0;
		used = false;
		team = 0;
	}

	/**
	 * @return Returns the team.
	 */
	public int getTeam() {
		return team;
	}
	/**
	 * @param team The team to set.
	 */
	public void setTeam(int team) {
		this.team = team;
	}


	/**
	 * @return Returns the units.
	 */
	public int getUnits() {
		return units;
	}
	/**
	 * @param units The units to set.
	 */
	public void setUnits(int units) {
		this.units = units;
	}
	/**
	 * @return Returns true if the grid piece is in use
	 */
	public boolean isUsed() {
		return used;
	}
	/**
	 * @param used The used to set.
	 */
	public void setUsed(boolean used) {
		this.used = used;
	}
	/**
	 * 
	 * @return the row of the gridpiece
	 */
	public int getX() {
		return x;
	}
	/**
	 * 
	 * @return the column of the gridpiece
	 */
	public int getY() {
		return y;
	}
}
